package info.empathymobile.batterymonitorapp;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


public class BootReceiverToServerSync extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		Intent serverSyncServiceIntent = new Intent(context, ServerSyncService.class);

		if(intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)){
			context.stopService(serverSyncServiceIntent);
		}
		context.startService(serverSyncServiceIntent);
	}
}
